<!DOCTYPE html>
<html lang="en" >

<head >
    <meta charset="UTF-8">
    <title>河南科技学院计算机等级考试报名</title>

    <!-- 新 Bootstrap4 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
    <script src="https://cdn.staticfile.org/popper.js/1.12.5/umd/popper.min.js"></script>
    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/js/bootstrap.min.js"></script>
    <!-- 移动设备优先 -->
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="../static/css/login.css" th:href="@{/css/login.css}"/>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
</head>
<body>
<div class="container">
    <div class="middle mx-auto h-75 w-75">
        <div class="row">
            <div class="col col-12 col-md-6">
                <img class="rounded img-fluid" th:src="@{/images/banner.png}" src="../static/images/banner.png" alt="河南科技学院">
                <br><br><br>
                <img class="rounded img-fluid" th:src="@{/images/appname.png}" src="../static/images/appname.png" alt="河南科技学院">
            </div>
            <div class="col col-12 col-md-6">
                <div class="login">
                    <a th:href="@{/dd}" href="/" style="margin-left: 250px">管理员登录</a>
                    <h5 class="font-weight-bold">学生登录</h5>
                    <p class="font-weight-light font2">计算机等级报名</p>

                    <form th:action="@{/student/login}" method="post">
                        <div class="form-group">
                            <input type="text" class="form-control" name="username" required id="username" onblur="a1()" placeholder="学号">
                            <span id="userInfo"></span>
                        </div>

                        <div class="form-group">
                            <input type="password" class="form-control" name="passwd" required placeholder="密码">
                        </div>
                        <a th:href="@{/student/AddStudent}" href="/student/AddStudent" style="margin-left: 250px">忘记密码</a>
                        <br>
                        <input type="submit" class="btn btn-primary btn-block w-75 mx-auto" value="登录"/>

                    </form>
                   <a th:href="@{/kk}" href="" style="margin-left: 270px">注册</a>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    function a1(){
        $.post({
            url:"/a1",
            data:{'username':$("#username").val()},
            success:function (data) {
                if (data.toString()==='OK'){
                    $("#userInfo").css("color","green");
                }else {
                    $("#userInfo").css("color","red");
                }
                $("#userInfo").html(data);
            },
        });
    }
</script>

</body>
</html>